package com.example.smart_campus.pojo.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.data.relational.core.mapping.Table;

import java.io.Serializable;

/**
 * <p>
 * 课程表，存储课程的基本信息
 * </p>
 *
 * @author liyv
 * @since 2024-10-19
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@Table("courses")
public class Courses implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 课程ID，主键
     */
    @TableId(value = "course_id", type = IdType.AUTO)
    private Integer courseId;

    /**
     * 课程编号
     */
    private String courseNo;

    /**
     * 课程名称
     */
    private String courseName;

    /**
     * 课程学分
     */
    private float credits;

    /**
     * 教师ID，外键
     */
    private Integer teacherId;

    /**
     * 授课地点
     */
    private String courseLocation;
    /**
     * 授课时间
     */
    private String courseTime;
    /**
     * 允许最大人数
     */
    private Integer max ;

    //课程介绍
    private String courseIntroduction;
    //选课开始时间
    private String selectBegin;
    //选课结束时间
    private String selectEnd;

    @Override
    public String toString() {
        return "Courses{" +
        "courseId=" + courseId +
        ", courseNo=" + courseNo +
        ", courseName=" + courseName +
        ", credits=" + credits +
        ", teacherId=" + teacherId +
        ", max=" + max +
        ", courseIntroduction=" + courseIntroduction +
        "}";
    }


}
